/**
 * 1、方法重载
 */
function getInfo(info: string): void
function getInfo(info: number): void
function getInfo(info: any): void {
  switch (typeof info) {
    case 'string':
      console.log(`string:${info}`)
      break;
    case 'number':
      console.log(`number:${info}`)
      break;
    default:
      console.log(`any:${info}`)
  }
}

getInfo("zhangsan")
getInfo(12)